<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<title>房屋租赁系统</title>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/common.css" />
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/main.css" />
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/libs/modernizr.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.validate.min.js"></script>
<style>
.error {
	font-size: 13px;
	color: red;
}
</style>
<script type="text/javascript">
	$().ready(function() {
		// 在键盘按下并释放及提交后验证提交表单
		$("#myform").validate({
			rules : {
				n_title : {
					required : true,
				},
				n_content : {
					required : true,
				}
			},
			messages : {
				n_title : {
					required : "标题不能为空！",
				},
				n_content : {
					required : "内容不能为空！",
				}
			}
		});
	})
</script>

</head>
<body>

	<div class="result-title">
		<h1>修改公告</h1>
	</div>
	<div class="result-content">
		<div class="sidebar-title">
			<form action="${pageContext.request.contextPath}/updateNotice.action"
				method="post" id="myform" name="myform"
				enctype="multipart/form-data">
				<table class="insert-tab" width="100%">
					<tbody>
						<tr>
							<th><i class="require-red">*</i>公告标题：</th>
							<td><input class="common-text required" id="n_title"
								value="${notice.n_title}" name="n_title" size="50" type="text"><input
								class="common-text required" id="n_id" value="${notice.n_id}"
								name="n_id" size="50" type="hidden"></td>
						</tr>
						<tr>
							<th><i class="require-red">*</i>公告内容：</th>
							<td><textarea id="n_content" rows="10" cols="60"
									style="border-radius: 10px; margin-top: 10px;" name="n_content">${notice.n_content}</textarea></td>
						</tr>
						<tr>
							<th></th>
							<td><input class="btn btn-primary btn6 mr10" value="提交"
								type="submit"> <input class="btn btn6"
								onclick="history.go(-1)" value="返回" type="button"></td>
						</tr>
						<tr>
							<font id="error" color="red">${error}</font>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
	</div>
</body>
</html>